﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class FriendLinkMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.FriendLink>
    {
        public FriendLinkMap()
        {
            // table
            //ToTable("CMS_FriendLinks");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.Title)
                
                .HasMaxLength(50)
                .IsRequired();
            Property(t => t.Logo)
                
                .HasMaxLength(100)
                .IsRequired();
            Property(t => t.Url)
                
                .HasMaxLength(100)
                .IsRequired();
            Property(t => t.OrderId)
                
                .IsRequired();
            Property(t => t.Pass)
                
                .IsRequired();
            Property(t => t.Password)
                
                .IsFixedLength()
                .HasMaxLength(32).IsUnicode(false)
                .IsRequired();
            Property(t => t.UpdateTime)
                
                .IsRequired();

            // Relationships

            //InitializeMapping();
        }
    }
}

